package com.cx.tran1.feign;

import feign.Param;
import feign.RequestLine;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * 参数用法
 * https://www.jianshu.com/p/8376d709d972
 */

@FeignClient(url = "http://127.0.0.1:9002/tran2",name="tran2service")
public interface Tran2FeignService {
    //@Headers("Content-Type: application/json")
    //@RequestLine("GET /add/{p}")
    @RequestMapping(value = "/add/{p}/{key}",method = RequestMethod.GET)
    String add(@PathVariable("p") String p,@PathVariable("key") String key);
}
